package com.example.cash.craft.service;

import com.example.cash.craft.pojo.param.ProductAddNewParam;
import com.example.cash.craft.pojo.param.ProductUpdateParam;
import com.example.cash.craft.pojo.vo.PageData;
import com.example.cash.craft.pojo.vo.ProductVO;
import org.springframework.transaction.annotation.Transactional;

@Transactional
public interface IProductService {

    void addNew(ProductAddNewParam param);

    void deleteById(Long id);

    void updateById(Long id, ProductUpdateParam param);

    ProductVO selectById(Long id);

    PageData<ProductVO> listAll(Integer page);

    PageData<ProductVO> listByCategoryId(Long categoryId, Integer page);

    void rebuildCache();

}
